//
//  WUConnectViewController.m
//  Home
//
//  Created by 吴军虎吴军虎 on 16/5/9.
//  Copyright © 2016年 LanJue. All rights reserved.
//

#import "WUConnectViewController.h"
#import "WUConnectTableViewCell.h"

@interface WUConnectViewController ()<UITableViewDelegate,UITableViewDataSource>

@property (nonatomic,retain) UITableView *tableView;
@property (nonatomic,retain) UIView *myheaderView;

@end

@implementation WUConnectViewController

-(void) viewWillAppear:(BOOL)animated
{
    self.tabBarController.tabBar.hidden=YES;
    self.title=@"沟通过的人物";
}

-(void) viewDidDisappear:(BOOL)animated
{
    self.tabBarController.tabBar.hidden=NO;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor=LV;
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"back"] style:UIBarButtonItemStylePlain target:self action:@selector(Back:)];
    self.navigationItem.leftBarButtonItem.tintColor = [UIColor whiteColor];
    
    _tableView=[[UITableView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height-65 *AUTO_HEIGHT) style:UITableViewStylePlain];
    _tableView.separatorStyle=UITableViewCellSelectionStyleNone;
    _tableView.delegate=self;
    _tableView.dataSource=self;
    _tableView.backgroundColor=LV;
    [self.view addSubview:_tableView];
    
}

-(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView
{
    return 1;
}

-(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 8;
}

-(CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 170/2 *AUTO_WIDTH;
}

-(UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    NSString *cellIdentifer=@"cell";
    
    WUConnectTableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:cellIdentifer];
    if (cell ==nil) {
        cell=[[WUConnectTableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifer];
    }
    
    cell.backgroundColor=[UIColor whiteColor];
    cell.selectionStyle=UITableViewCellSelectionStyleNone;
    return cell;
}


-(void) Back:(UIButton *) btn
{
    [self.navigationController popViewControllerAnimated:YES];
}

@end
